﻿using System.Threading.Tasks;

namespace Loong.Threading.Locks.Database
{
    public interface IResourceLockDbAccessor
    {
        Task<ResourceLock> GetByResourceAsync(string resource);
        Task InsertAsync(ResourceLock resourceLock);
        Task<bool> UpdateLockAsync(ResourceLock resourceLock);
        bool ReleaseLock(string resource, string lockOwner);
    }
}
